#include <stdio.h>
#include <string.h>
#include "hme_includes.h"
#include "hme_retarget.h"



uint32_t HAL_Phase0(void)
{
    /*Initialize necessary debugging functions*/
    HME_UART_InitTypeDef init;
    HME_UART_StructInit(&init);
    HME_UART_Init(DEMO_UART, &init);

    /*Enable Interrupt Vector */
    NVIC_EnableIRQ(DEMO_UART_IRQn);
    /*Enable Reception Function*/
    HME_UART_ITConfig(DEMO_UART, UART_Int_Received_Data_Available, true);
    
    return RET_OK;
}

int main(void)
{
    uint32_t ret = RET_OK;

    ret = HAL_Phase0();

    if (ret != RET_OK) {
    printf("Phase0 has failed!\r\n");
        return ret;
    }
    printf("Hello, Welcome to use H7 series FPGA chips!\r\n");

    while(1){};
}
